<template>
  <view class="search-item-container" @click="navTo">
    <view class="left-container">
      <wd-icon name="spool" size="18px" color="#508963"></wd-icon>
      <view class="scenic-spot-name">{{props.resultItem.name}}</view>
<!--      <view class="description">. 阿坝州</view>-->
<!--      <view class="complement"> {{props.resultItem.address}}</view>-->
    </view>
    <view class="right-container">
      <wd-icon name="arrow-right" size="10px" color="#ffffff"></wd-icon>
    </view>
  </view>
</template>

<script setup>
  import {useMixin} from "@/hook/useMixin";

  const {handleNavToProviderDetail} = useMixin();

  const props = defineProps({
    resultItem:{
      type: Object,
      default: {}
    }
  });

  const navTo = () => {
    handleNavToProviderDetail(props.resultItem);
  };
</script>

<style lang="scss" scoped>
  .search-item-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20rpx 0;
    border-bottom: 1px solid  #EEF0DF;

    .left-container {
      display: flex;
      align-items: center;
      .scenic-spot-name {
        font-size: 29rpx;
        margin-left: 11rpx;
        color: #508963;
      }
      .description {
        font-size: 29rpx;
      }
      .complement {
        height: 40rpx;
        width: 68%;
        font-size: 29rpx;
        color: #777777;
        margin-left: 11rpx;
        overflow: hidden;
        white-space: normal;
        text-overflow: ellipsis;
      }
    }
    .right-container {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 30.5rpx;
      height: 30.5rpx;
      border-radius: 50%;
      background: #777777;
    }
  }
</style>
